<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 网站管理 <span class="c-gray en">&gt;</span> 链接管理</nav>
	<div id="sectionContent" class="Hui-article">
		<article class="cl pd-20">

      <div class="page-container">
	<div class="form form-horizontal" id="form-article-add">
		<div id="tab-system" class="HuiTab">
			<div class="tabBar cl">
				<span>基本设置</span>
				<span>七牛云设置</span>
				<span>邮件设置</span>
				<span>其他设置</span>
			</div>
			<div class="tabCon">
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						网站名称：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" placeholder="控制在25个字、50个字节以内" value="{{siteInfo.title}}" class="input-text" id="title">
					</div>
				</div>
        <div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						网站域名：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" placeholder="网站域名" value="{{siteInfo.domainName}}" class="input-text" id="domainName">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						关键词：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" placeholder="网站关键词中间用,分割" value="{{siteInfo.keywords}}" class="input-text" id="keywords">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						描述：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" placeholder="网站描述信息" value="{{siteInfo.describe}}" class="input-text" id="describe">
					</div>
				</div>
        <div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						网站拥有人：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" placeholder="网站拥有人" value="{{siteInfo.author}}" class="input-text" id="author">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						html静态化地址：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" placeholder="默认为空，为相对路径" value="{{siteInfo.staticPath}}" class="input-text" id="staticPath">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						底部版权信息：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" placeholder="&copy; 2016 H-ui.net" value="{{siteInfo.copyright}}" class="input-text" id="copyright">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">备案号：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" placeholder="京ICP备00000000号" value="{{siteInfo.icp}}" class="input-text" id="icp">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">统计代码：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<textarea class="textarea"  id="statisticalCode">{{siteInfo.statisticalCode}}</textarea>
					</div>
				</div>
			</div>
			<div class="tabCon">
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">请求前缀：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" class="input-text" id="prefixUri" value="{{siteInfo.qiniu.prefixUri}}" >
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">bucket：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text"  class="input-text" value="{{siteInfo.qiniu.bucket}}" id="bucket">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">accessKey：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" id="accessKey" value="{{siteInfo.qiniu.accessKey}}" class="input-text">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">secretKey：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" class="input-text" value="{{siteInfo.qiniu.secretKey}}" id="secretKey" name="" >
					</div>
				</div>
			</div>
			<div class="tabCon">
				扩展1
			</div>
			<div class="tabCon">
					扩展2
			</div>

			<div class="row cl">
				<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
					<button v-on:click="saveSiteInfo()" class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存</button>
				</div>
			</div>
		</div>
	</div>
</div>



		</article>
	</div>
<script type="text/javascript">
    $(function(){
    	$('.skin-minimal input').iCheck({
    		checkboxClass: 'icheckbox-blue',
    		radioClass: 'iradio-blue',
    		increaseArea: '20%'
    	});
    	$("#tab-system").Huitab({
    		index:0
    	});
    });
</script>

<script>
      new Vue({
          el:'#sectionContent',
          http: authorization(),
          data:{
              siteInfo:{}
          },
          created:function(){
              this.$http.get('/restful/cms/v1.0/sinfo').then((response) => {
                  this.siteInfo = responseObj(response).data;
              }).catch(function(response) {
                  alert(errorMsg(response));
              });
          },
          methods:{
              saveSiteInfo:function(){
                  var formData = {
                    domainName:$('#domainName').val(),
                    author:$('#author').val(),
                    title:$('#title').val(),
                    describe:$('#describe').val(),
                    copyright:$('#copyright').val(),
                    staticPath:$('#staticPath').val(),
                    keywords:$('#keywords').val(),
                    statisticalCode:$('#statisticalCode').val(),
                    icp:$('#icp').val(),
										qiniu:{
											prefixUri:$('#prefixUri').val(),
											accessKey:$('#accessKey').val(),
											secretKey:$('#secretKey').val(),
											bucket:$('#bucket').val()
										}
                  };
                  this.$http.put('/restful/cms/v1.0/sinfo',formData).then((response) => {
                      alert('站点信息修改成功');
                  }).catch(function(response) {
                      alert(errorMsg(response));
                  });
              }
          }


      });
  </script>
